<template>

  <div>
    <h1 id="title" class="myTest">登录</h1>
    <span>用户名:</span>
    <input type="text" v-model="userInfo.userName">
    <span>密码</span>
    <input type="password" v-model="userInfo.userPassword">

    <button type="button" @click="login">登录</button>
  </div>
</template>

<script>
  /* 导入自定义的函数和变量*/
  import {add,hello} from '../../assets/js/test.js'
/* 导入自定义对象 */
   import count from "../../assets/js/test01.js"
  export default{
    name:"hello01",//描述组件名称
    data(){//数据绑定对象，对应的是data
      return{
        userInfo:{//绑定用户对象
          userName:"",
          userPassword:""
        }
      }
    },
    methods:{//定义函数
    login(){//登录
    // var title = $("#title").text();
    // alert(title);
    // add();
    // alert(hello);
    count.add();
     alert(count.hello);


    }

    }
  }
</script>

<style>
</style>
